package com.sys.SysGrowthRecords.service.impl;

import java.util.List;

import com.sys.SysTanks.domain.SysTanks;
import com.sys.SysTanks.mapper.SysTanksMapper;
import com.sys.common.core.domain.AjaxResult;
import com.sys.common.utils.DateUtils;
import com.sys.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sys.SysGrowthRecords.mapper.SysGrowthRecordsMapper;
import com.sys.SysGrowthRecords.domain.SysGrowthRecords;
import com.sys.SysGrowthRecords.service.ISysGrowthRecordsService;

/**
 * 生长记录Service业务层处理
 * 
 * @author sys
 * @date 2025-09-04
 */
@Service
public class SysGrowthRecordsServiceImpl implements ISysGrowthRecordsService 
{
    @Autowired
    private SysGrowthRecordsMapper sysGrowthRecordsMapper;



    /**
     * 查询生长记录
     * 
     * @param id 生长记录主键
     * @return 生长记录
     */
    @Override
    public SysGrowthRecords selectSysGrowthRecordsById(Long id)
    {
        return sysGrowthRecordsMapper.selectSysGrowthRecordsById(id);
    }

    /**
     * 查询生长记录列表
     * 
     * @param sysGrowthRecords 生长记录
     * @return 生长记录
     */
    @Override
    public List<SysGrowthRecords> selectSysGrowthRecordsList(SysGrowthRecords sysGrowthRecords)
    {
        return sysGrowthRecordsMapper.selectSysGrowthRecordsList(sysGrowthRecords);
    }

    /**
     * 新增生长记录
     *
     * @param sysGrowthRecords 生长记录
     * @return 结果
     */
    @Override
    public int insertSysGrowthRecords(SysGrowthRecords sysGrowthRecords)
    {
        sysGrowthRecords.setCreateTime(DateUtils.getNowDate());
        sysGrowthRecords.setUpdateTime(DateUtils.getNowDate());
        sysGrowthRecords.setCreateBy(SecurityUtils.getUsername());
        sysGrowthRecords.setUpdateBy(SecurityUtils.getUsername());
        return sysGrowthRecordsMapper.insertSysGrowthRecords(sysGrowthRecords);
    }

    /**
     * 修改生长记录
     * 
     * @param sysGrowthRecords 生长记录
     * @return 结果
     */
    @Override
    public int updateSysGrowthRecords(SysGrowthRecords sysGrowthRecords)
    {
        sysGrowthRecords.setUpdateTime(DateUtils.getNowDate());
        sysGrowthRecords.setUpdateBy(SecurityUtils.getUsername());
        return sysGrowthRecordsMapper.updateSysGrowthRecords(sysGrowthRecords);
    }

    /**
     * 批量删除生长记录
     * 
     * @param ids 需要删除的生长记录主键
     * @return 结果
     */
    @Override
    public int deleteSysGrowthRecordsByIds(Long[] ids)
    {
        return sysGrowthRecordsMapper.deleteSysGrowthRecordsByIds(ids);
    }

    /**
     * 删除生长记录信息
     * 
     * @param id 生长记录主键
     * @return 结果
     */
    @Override
    public int deleteSysGrowthRecordsById(Long id)
    {
        return sysGrowthRecordsMapper.deleteSysGrowthRecordsById(id);
    }
}
